<?php

namespace app\index\controller;

use app\common\controller\Home;
use think\facade\Cookie;
use think\facade\Session;

class Base extends  Home
{
    public function initialize()
    {
        parent::initialize();
        //Cookie::delete("user");
        $user = _get_current_user();
        if(isset($user['avatar'])) $user['avatar'] = _get_image_preview_url($user['avatar']);
        $this->assign([
            "user"        => $user,
            "siteConfig"  => get_option('site_info'),
            "version"     => get_version(),
            "systemConfig"=> get_option("system_setting")
        ]);
    }
}